Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normalize URLs in HMAC interceptor #114

Merged
merged 2 commits into from
Jan 10, 2018
Merged

Conversation

srl295
Copy link
Contributor

@srl295 srl295 commented Jan 10, 2018

  • and unit tests thereof
  • also, uncomment the HMAC debugging code (if variable GP_VERBOSE is true)

Fixes: #113

- and unit tests thereof
- also, uncomment the HMAC debugging code (if variable GP_VERBOSE is true)

Fixes: IBM-Cloud#113
@srl295 srl295 added the bug label Jan 10, 2018
@srl295 srl295 self-assigned this Jan 10, 2018
@srl295 srl295 requested review from yumaoka and hchawla1 January 10, 2018 00:20
GaasHmac.prototype.SEP = "\n";
GaasHmac.prototype.ENC = "ascii"; // ISO-8859-1 not supported!
GaasHmac.prototype.HMAC_SHA1_ALGORITHM = 'sha1'; // "HmacSHA1";
GaasHmac.prototype.forceDate = null;
GaasHmac.prototype.forceDateString = null;

// GaasHmac.prototype.VERBOSE = process.env.GP_VERBOSE || false;
GaasHmac.prototype.VERBOSE = process.env.GP_VERBOSE || false;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was mostly disabled because of the lint rule, but I fixed the lint rule.

@@ -36,13 +38,14 @@ GaasHmac.prototype.user = undefined;
GaasHmac.prototype.secret = undefined;

GaasHmac.prototype.AUTH_SCHEME = "GaaS-HMAC";
// GaasHmac.prototype.AUTH_SCHEME = "GP-HMAC";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should switch the scheme in the future?

@srl295 srl295 merged commit 3b72f1a into IBM-Cloud:master Jan 10, 2018
@srl295 srl295 deleted the space-in-key branch January 10, 2018 04:19
@srl295
Copy link
Contributor Author

srl295 commented May 4, 2020

Note this is to work around swagger-api/swagger-js#1220 — could remove the around once fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Getting unauthorized (401) on some keys with spaces
2 participants